﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Models;

namespace IServices
{
    public interface ICategoryServices
    {
        /// <summary>
        /// 获取所有记录
        /// </summary>
        /// <returns></returns>
        List<CategoryInfo> GetAll();
        /// <summary>
        /// 查询该条件下  若无此条件保持默认值
        /// </summary>
        /// <param name="categoryInfo"></param>
        /// <returns></returns>
        int GetCount(CategoryInfo categoryInfo);
        /// <summary>
        /// 通过ID获取具体的类别信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int GetById(int id);
        /// <summary>
        /// 更新类别信息若无此条件保持默认值
        /// </summary>
        /// <param name="categoryInfo"></param>
        /// <returns></returns>
        int Update(CategoryInfo categoryInfo);
        /// <summary>
        /// 删除类别信息  若无此条件保持默认值
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        int Delete(params int []ids);
        /// <summary>
        /// 插入类别信息若无此条件保持默认值
        /// </summary>
        /// <param name="categoryInfo"></param>
        /// <returns></returns>
        int Insert(CategoryInfo categoryInfo);

    }
}
